/*
var arr = ['a','b','c','d'];
//翻转数组元素;
arr.reverse();
console.log(arr);
*/
/*
var arr = [23,9,78,6,45];
//排序
arr.sort(function(a,b){
	console.log(a,b)
	//return a-b;
	return b-a;
});
console.log(arr);
*/
/*
var arr1 = ['陈辉','李昊','冯勉'];
var arr2 = ['涛桑','包新龙','林波'];
var arr3 = ['王书','易望龙','崔晨锐'];
console.log(arr1.concat(arr2,arr3));
*/
/*
var arr = ['陈辉','李昊','冯勉','包新龙','林波','王书','易望龙','崔晨锐'];
console.log( arr.slice(2,3));
console.log(arr.slice(-3,-1))
*/
/*
var arr = ['a','b','c','d','e','f'];
var arr1=arr.slice(1,3);
var arr2=arr.slice(4);
console.log(arr1.concat(arr2));
*/
/*
var arr = ['陈辉','李昊','冯勉','包新龙','林波','王书','易望龙','崔晨锐'];
//删除数组元素
//console.log(arr.splice( 1 ));
console.log(arr.splice( -4,0,"傲天","日天","齐天" ));
console.log(arr);
*/
var arr = ['a','b','c','d','e','f','g','h']
arr.splice(2,2)
arr.splice(-3,1,"m")
arr.splice(1,0,"z")
console.log(arr)

for (var i = 0,j=0;i<arr.length;i++ ){
	if (arr[i]==="e"){
	break;
	}
	j++
}
console.log(j)
